<h1>Listing subjects</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Description</th>
    <th>Grade</th>
  </tr>

<% @subjects.each do |subject| %>
  <tr>
    <td><%=h subject.name %></td>
    <td><%=h subject.description %></td>
    <td><%=h subject.grade_id %></td>
    <td><%= link_to 'Show', subject %></td>
    <td><%= link_to 'Edit', edit_subject_path(subject) %></td>
    <td><%= link_to 'Destroy', subject, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New subject', new_subject_path %>